import { service } from "../http/index";

// 预约咨询

export function getConsultantList(data) {
  return service({
    method: "get",
    url: "/api/consultant/page",
    params: data,
  });
} //分页获取咨询师列表

export function topics(data) {
  return service({
    method: "get",
    url: "/api/consultant/topics",
    params: data,
  });
}

export function detail(data) {
  return service({
    method: "get",
    url: "/api/consultant/detail" + "/" + data.consultantId + "/" + data.userId,
  });
}
export function planTime(data) {
  return service({
    method: "post",
    url: "/api/consultant/planTime",
    data,
  });
}

export function evaluation(data) {
  return service({
    method: "get",
    url: "/api/consultant/evaluation/" + data.consultantId,
    params: data,
  });
}

export function toReserve(data) {
  return service({
    method: "get",
    url:
      "/api/consultant/to-reserve/" +
      data.consultantId +
      "/" +
      data.userId +
      "/" +
      data.unitId,
    params: data,
  });
}

export function reserve(data) {
  return service({
    method: "post",
    url: "/api/consultant/reserve",
    data: data,
  });
}

export function tree(data) {
  return service({
    method: "get",
    url: "/api/consultant/areas/tree",
    params: data,
  });
}

// 员工端预约记录列表
export function getIntakeByMobile(data) {
  return service({
    method: "post",
    url: "/employee/getIntakeByMobile",
    data,
  });
}

export function getIntakeById(data) {
  return service({
    method: "get",
    url: "/employee/getIntakeById" + "/" + data.id,
  });
}

// 测评记录
export function votelogList(data) {
  return service({
    method: "get",
    url: "/employee/votelogList",
    params: data,
  });
}

export function practiceHomePage(data) {
  return service({
    method: "get",
    url: "/employee/practiceHomePage",
    params: data,
  });
}

// 打卡训练操作
export function practiceCheckin(data) {
  return service({
    method: "get",
    url: "/employee/practiceCheckin",
    params: data,
  });
}
// 打卡获取题目
export function getLbassessment(data) {
  return service({
    method: "get",
    url: "/employee/getLbassessment",
    params: data,
  });
}
// 打卡提交
export function lbAnswerSave(data) {
  return service({
    method: "post",
    url: "/employee/lbAnswerSave",
    data,
  });
}
// 打卡查看报告
export function getLbassessmentReport(data) {
  return service({
    method: "get",
    url: "/employee/getLbassessmentReport",
    params: data,
  });
}

// 每日情绪记录
export function dailyEmotionRecord(data) {
  return service({
    method: "post",
    url: "/employee/dailyEmotionRecord",
    data,
  });
}
